<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      6.29.&nbsp;M4-1.4.16
    </title>
    <link rel="stylesheet" href="../stylesheets/lfs.css" type="text/css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
  </head>
  <body class="lfs" id="lfs-7.3">
    <div class="navheader">
      <h4>
        Linux From Scratch - Version 7.3
      </h4>
      <h3>
        Chapter&nbsp;6.&nbsp;Installing Basic System Software
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="iana-etc.html" title=
          "Iana-Etc-2.30">Prev</a>
          <p>
            Iana-Etc-2.30
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="bison.html" title="Bison-2.7">Next</a>
          <p>
            Bison-2.7
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="chapter06.html" title=
          "Chapter&nbsp;6.&nbsp;Installing Basic System Software">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Linux From Scratch - Version 7.3">Home</a>
        </li>
      </ul>
    </div>
    <div class="wrap" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="ch-system-m4" name="ch-system-m4"></a>6.29. M4-1.4.16
      </h1>
      <div class="package" lang="en" xml:lang="en">
        <p>
          The M4 package contains a macro processor.
        </p>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">Approximate build time:</strong>
              <span class="segbody">0.4 SBU</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Required disk space:</strong>
              <span class="segbody">26.6 MB</span>
            </div>
          </div>
        </div>
      </div>
      <div class="installation" lang="en" xml:lang="en">
        <h2 class="sect2">
          6.29.1. Installation of M4
        </h2>
        <p>
          Fix an incompatibility between this package and Glibc-2.17:
        </p>
        <pre class="userinput">
<kbd class="command">sed -i -e '/gets is a/d' lib/stdio.in.h</kbd>
</pre>
        <p>
          Prepare M4 for compilation:
        </p>
        <pre class="userinput">
<kbd class="command">./configure --prefix=/usr</kbd>
</pre>
        <p>
          Compile the package:
        </p>
        <pre class="userinput">
<kbd class="command">make</kbd>
</pre>
        <p>
          To test the results, first fix a test program and then run the test
          programs:
        </p>
        <pre class="userinput">
<kbd class=
"command">sed -i -e '41s/ENOENT/&amp; || errno == EINVAL/' tests/test-readlink.h
make check</kbd>
</pre>
        <p>
          Install the package:
        </p>
        <pre class="userinput">
<kbd class="command">make install</kbd>
</pre>
      </div>
      <div class="content" lang="en" xml:lang="en">
        <h2 class="sect2">
          <a id="contents-m4" name="contents-m4"></a>6.29.2. Contents of M4
        </h2>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">Installed program:</strong>
              <span class="segbody">m4</span>
            </div>
          </div>
        </div>
        <div class="variablelist">
          <h3>
            Short Descriptions
          </h3>
          <table border="0">
            <col align="left" valign="top" />
            <tbody>
              <tr>
                <td>
                  <p>
                    <a id="m4" name="m4"></a><span class="term"><span class=
                    "command"><strong>m4</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    copies the given files while expanding the macros that
                    they contain. These macros are either built-in or
                    user-defined and can take any number of arguments.
                    Besides performing macro expansion, <span class=
                    "command"><strong>m4</strong></span> has built-in
                    functions for including named files, running Unix
                    commands, performing integer arithmetic, manipulating
                    text, recursion, etc. The <span class=
                    "command"><strong>m4</strong></span> program can be used
                    either as a front-end to a compiler or as a macro
                    processor in its own right.
                  </p>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="iana-etc.html" title=
          "Iana-Etc-2.30">Prev</a>
          <p>
            Iana-Etc-2.30
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="bison.html" title="Bison-2.7">Next</a>
          <p>
            Bison-2.7
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="chapter06.html" title=
          "Chapter&nbsp;6.&nbsp;Installing Basic System Software">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Linux From Scratch - Version 7.3">Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
